﻿package mortal.game.view.copy.worldBoss.smallBossPanel
{
    import Message.Game.*;
    import com.mui.controls.*;
    import com.mui.display.*;
    import mortal.common.global.*;
    import mortal.game.view.common.*;

    public class SmallBossHurtCellRender extends GCellRenderer
    {
        protected var info:SWorldBossHurtRankInfo;
        protected var rank:GTextFiled;
        protected var group:GTextFiled;
        protected var hurt:GTextFiled;
        protected var line:ScaleBitmap;

        public function SmallBossHurtCellRender()
        {
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            super.data = param1;
            this.info = param1 as SWorldBossHurtRankInfo;
            if (!this.rank)
            {
                this.rank = UIFactory.gTextField("", 0, 1, 120, 20, this, GlobalStyle.textFormatHuang);
                this.group = UIFactory.gTextField("", 53, 1, 120, 20, this, GlobalStyle.textFormatHuang);
                this.hurt = UIFactory.gTextField("", 188, 1, 120, 20, this, GlobalStyle.textFormatHuang);
                if (this.info.rank < 5)
                {
                    this.line = UIFactory.bg(-20, 22, 285, 2, this, "SplitLine");
                }
            }
            this.rank.text = this.info.rank.toString();
            this.group.text = this.info.guildName.toString();
            this.hurt.text = this.info.hurt.toString();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this.info = null;
            this.rank.dispose();
            this.rank = null;
            this.group.dispose();
            this.group = null;
            this.hurt.dispose();
            this.hurt = null;
            if (this.line)
            {
                this.line.dispose();
                this.line = null;
            }
            super.disposeImpl();
            return;
        }// end function

    }
}
